home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue46 / Clinic / AutomationServer1_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-03-12  |  4.0 KB  |  96 lines

  1. unit AutomationServer1_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                  //
  5. // -------                                                                  //
  6. // The types declared in this file were generated from data read from a     //
  7. // Type Library. If this type library is explicitly or indirectly (via      //
  8. // another type library referring to this type library) re-imported, or the //
  9. // 'Refresh' command of the Type Library Editor activated while editing the //
  10. // Type Library, the contents of this file will be regenerated and all      //
  11. // manual modifications will be lost.                                       //
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.11.1.75  $
  15. // File generated on 12/03/99 17:22:50 from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: D:\Magazines\Work In Progress\46 - Jun 99\Clinic\COM\AutomationServer1.tlb
  19. // IID\LCID: {38A483A0-D898-11D2-96EC-444553540000}\0
  20. // Helpfile: 
  21. // HelpString: AutomationServer Library
  22. // Version:    1.0
  23. // ************************************************************************ //
  24.  
  25. interface
  26.  
  27. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  28.  
  29. // *********************************************************************//
  30. // GUIDS declared in the TypeLibrary. Following prefixes are used:      //
  31. //   Type Libraries     : LIBID_xxxx                                    //
  32. //   CoClasses          : CLASS_xxxx                                    //
  33. //   DISPInterfaces     : DIID_xxxx                                     //
  34. //   Non-DISP interfaces: IID_xxxx                                      //
  35. // *********************************************************************//
  36. const
  37.   LIBID_AutomationServer1: TGUID = '{38A483A0-D898-11D2-96EC-444553540000}';
  38.   IID_IClock: TGUID = '{38A483A1-D898-11D2-96EC-444553540000}';
  39.   CLASS_Clock: TGUID = '{38A483A3-D898-11D2-96EC-444553540000}';
  40. type
  41.  
  42. // *********************************************************************//
  43. // Forward declaration of interfaces defined in Type Library            //
  44. // *********************************************************************//
  45.   IClock = interface;
  46.   IClockDisp = dispinterface;
  47.  
  48. // *********************************************************************//
  49. // Declaration of CoClasses defined in Type Library                     //
  50. // (NOTE: Here we map each CoClass to its Default Interface)            //
  51. // *********************************************************************//
  52.   Clock = IClock;
  53.  
  54.  
  55. // *********************************************************************//
  56. // Interface: IClock
  57. // Flags:     (4416) Dual OleAutomation Dispatchable
  58. // GUID:      {38A483A1-D898-11D2-96EC-444553540000}
  59. // *********************************************************************//
  60.   IClock = interface(IDispatch)
  61.     ['{38A483A1-D898-11D2-96EC-444553540000}']
  62.     function Get_DateAndTime: TDateTime; safecall;
  63.     property DateAndTime: TDateTime read Get_DateAndTime;
  64.   end;
  65.  
  66. // *********************************************************************//
  67. // DispIntf:  IClockDisp
  68. // Flags:     (4416) Dual OleAutomation Dispatchable
  69. // GUID:      {38A483A1-D898-11D2-96EC-444553540000}
  70. // *********************************************************************//
  71.   IClockDisp = dispinterface
  72.     ['{38A483A1-D898-11D2-96EC-444553540000}']
  73.     property DateAndTime: TDateTime readonly dispid 1;
  74.   end;
  75.  
  76.   CoClock = class
  77.     class function Create: IClock;
  78.     class function CreateRemote(const MachineName: string): IClock;
  79.   end;
  80.  
  81. implementation
  82.  
  83. uses ComObj;
  84.  
  85. class function CoClock.Create: IClock;
  86. begin
  87.   Result := CreateComObject(CLASS_Clock) as IClock;
  88. end;
  89.  
  90. class function CoClock.CreateRemote(const MachineName: string): IClock;
  91. begin
  92.   Result := CreateRemoteComObject(MachineName, CLASS_Clock) as IClock;
  93. end;
  94.  
  95. end.
  96.